<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  {include="style"}

</head>
<body >

<div class="layui-tab" style="margin:15px;">
  <ul class="layui-tab-title">
    <li class="layui-this">插件设置</li>
    

  </ul>
  <div class="layui-tab-content">
    <div class="layui-tab-item layui-show">
  <div class="layui-rows" style="margin: 10px;">
    <form class="layui-form layui-form-pane" action="">
  <!--表单必须要携带ID-->
  <blockquote class="layui-elem-quote">百度站长信息填写</blockquote>
  <input name="id" value="{$plugins['id']}" type="hidden">
     <div class="layui-form-item layui-form-text">
    <label class="layui-form-label">百度站长推送接口 <b><a target="_blank" href="https://ziyuan.baidu.com/linksubmit/index" style="color:#f00">点击查看</a></b> </label>
    <div class="layui-input-block">
      <input type="text" name="baiduwebapi" value="{$config['baiduwebapi']}" placeholder="如果没有，请留空"  class="layui-input" />
    </div>
    
    </div>
      <div class="layui-form-item layui-form-text">
    <label class="layui-form-label">百度熊掌号推送接口 <b><a target="_blank" href="http://baijiahao.baidu.com/" style="color:#f00">点击查看</a></b> </label>
    <div class="layui-input-block">
      <input type="text" name="baiduxzapi" value="{$config['baiduxzapi']}" placeholder="如果没有，请留空"  class="layui-input" />
    </div>
    
    </div>
	
	<div class="layui-form-item layui-form-text">
    <label class="layui-form-label">需要推送模块 <b>请用|分隔模块标识，如：article|product|classtype</b> </label>
    <div class="layui-input-block">
      <input type="text" name="molds" value="{$config['molds']}" placeholder="请用|分隔模块标识"  class="layui-input" />
    </div>
    
    </div>
	
    <div class="layui-form-item">
    <label class="layui-form-label">更新频率  </label>
    <div class="layui-inline">
        <div class="layui-input-inline">
        <input type="number" name="puttime" value="{if(isset($config['puttime']))}{$config['puttime']}{else}1{/if}" placeholder="请填写数字"  class="layui-input" />
        </div>
        <div class="layui-input-inline">
        <select name="puttype" lay-filter="puttype">
        {if(isset($config['puttype']))}
        <option value="{$config['puttype']}">{$config['puttype']}</option>
        {/if}
          <option value="天">天</option>
          <option value="月">月</option>
          <option value="日">日</option>
        </select>
        </div>
    </div>
    
    </div>
    
   
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>

    </div>
  </div>
</form>
</div>
    </div>
    <div class="layui-tab-item">

  

    </div>

  </div>
</div>





    <script>
        $(function  () {
      
            layui.use('form', function(){
              var form = layui.form;
             
              //监听提交
              form.on('submit(formDemo)', function(data){
           
        $.post("{fun U('setconf')}",data.field,function(res){
            //console.log(res);return false;
           var res = JSON.parse(res);
           if(res.code==1){
            layer.msg(res.msg);
           }else{
            layer.msg(res.msg, {icon: 6,time: 2000},function(){
            window.location.reload();
            });
                     
            
             
           }
        })
        
                return false;
              });
            });
        })

        
    </script>

    
 
</body>
</html>